package org.csu.mybigpro.controller;

import org.csu.mybigpro.domain.User;
import org.csu.mybigpro.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

@RestController
@RequestMapping("/users")
public class UserController {
    @Autowired
    private UserService userService;

    @GetMapping
    public List<User> list() {
        return userService.list(); // MyBatis-Plus的list()，返回所有用户
    }
}